home *** CD-ROM | disk | FTP | other *** search
/ Turnbull China Bikeride / Turnbull China Bikeride - Disc 1.iso / ARGONET / PD / PROGRAMMING / DESKLIBC / SOURCES.ZIP / DeskLib / !DLSources / Libraries / Menu2 / c / Msgs < prev   
Text File  |  1995-07-13  |  1KB  |  45 lines

  1. /*
  2.     ####             #    #     # #
  3.     #   #            #    #       #          The FreeWare C library for 
  4.     #   #  ##   ###  #  # #     # ###             RISC OS machines
  5.     #   # #  # #     # #  #     # #  #   ___________________________________
  6.     #   # ####  ###  ##   #     # #  #                                      
  7.     #   # #        # # #  #     # #  #    Please refer to the accompanying
  8.     ####   ### ####  #  # ##### # ###    documentation for conditions of use
  9.     ________________________________________________________________________
  10.  
  11.     File:    Menu2.Msgs.c
  12.     Author:  Copyright © 1995 Julian Smith
  13.     Version: 1.00 (12 Jul 1995)
  14.     Purpose: Creating menus using message tags for menu title and 
  15.              specification
  16. */
  17.  
  18. #include "DeskLib:Msgs.h"
  19. #include "DeskLib:Menu2.h"
  20. #include "DeskLib:Str.h"
  21.  
  22.  
  23. menu2_handle    Menu2_CreateFromMsgs(
  24.             char        *titletag,
  25.             char        *spectag,
  26.             menu2_makefn    makefn,
  27.             menu2_flagsfn    flagsfn,
  28.             menu2_subfn    subfn,
  29.             menu2_selectfn    selectfn,
  30.             void        *reference
  31.             )
  32. {
  33. char    specbuffer[ 256];
  34. char    titlebuffer[ 16];
  35. char    *spec, *title;
  36.  
  37. Msgs_Lookup( titletag, titlebuffer, 15);
  38. Msgs_Lookup( spectag, specbuffer, 255);
  39. spec = strdup( specbuffer);
  40. title = strdup( titlebuffer);
  41.  
  42. return Menu2_Create( title, spec, makefn, flagsfn, subfn, selectfn, reference);
  43. }
  44.  
  45.